const conf = require('./config/defaultConfig');
const yargs = require('yargs');
const Server = require('./app');

    const argv = yargs
        .usage('anywhere [options]')
        .option('p', {
            alias:"port",
            describe:'端口号',
            default:conf.port
        })
        .option('h', {
            alias:"hostname",
            describe:'host',
            default:conf.hostname
        })
        .option('d', {
            alias:"root",
            describe:'root path',
            default:conf.root
        })
        .version()
        .alias('v', 'version')
        .help()
        .argv;

        const server = new Server(argv);
        server.start();
